/**
 * @description 登陆验证中间件
 * @author 李哲
 */
const { errnoModel } = require('../res-model/index');
module.exports = async function loginCheng(ctx, next) {
    const { userInfor } = ctx.session
    if (userInfor && userInfor.username) {
        await next()
        return
    }
    ctx.body = new errnoModel(1003, '登录验证失败')
}